package com.wang.lotterysystem.controller.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class DrawPrizeParam {

    @Schema(description = "活动id")
    @NotNull(message = "活动id不能为空")
    private Long activityId;

    @Schema(description = "中奖奖品id")
    @NotNull(message = "奖品id不能为空")
    private Long prizeId;

    @Schema(description = "中奖时间")
    @NotNull(message = "中奖时间不能为空")
    private Date winningTime;

    @Schema(description = "中奖人员列表")
    @NotEmpty(message = "中奖人员列表不能为空")
    private List<Winner> winnerList;



    @Data
    public static class Winner{

        @Schema(description = "中奖人员id")
        @NotNull(message = "中奖人员id不能为空")
        private Long userId;

        @Schema(description = "中奖人员用户名")
        @NotBlank(message = "中奖人员用户名不能为空")
        private String userName;
    }
}